import request from '@/api/request.js'

function addressList(data) {
    return request({
        url: '/api/leju/front/address/list',
        method: 'get',
        data
    })
}

function addressSave(data) {
    return request({
        url: '/api/leju/front/address/save',
        method: 'post',
        data
    })
}

function detail(data) {
    return request({
        url: '/api/leju/front/address/detail',
        method: 'get',
        data
    })
}

function addressUpdate(data) {
    return request({
        url: '/api/leju/front/address/update',
        method: 'post',
        data
    })
}
function del(data) {
    return request({
        url: '/api/leju/front/address/del',
        method: 'get',
        data
    })
}

function addOrderBatch(data) {
    return request({
        url: '/api/leju/front/order/addOrderBatch',
        method: 'POST',
        data
    })
}


// 订单列表
function orderList(data) {
    return request({
        url: '/api/leju/front/order/list',
        method: 'get',
        data
    })
}
// 确认付款
function payConfirm(data) {
    return request({
        url: '/api/leju/front/order/payConfirm',
        method: 'POST',
        data
    })
}
// 确认收货
function allDone(data) {
    return request({
        url: '/api/leju/front/order/allDone',
        method: 'get',
        data
    })
}
// 退货
function backOrder(data) {
    return request({
        url: '/api/leju/front/order/backOrder',
        method: 'POST',
        data
    })
}
// 退货列表
function orderBackList(data) {
    return request({
        url: '/api/leju/front/order/orderBackList',
        method: 'get',
        data
    })
}

//取消订单
function delOrderPre(data) {
    return request({
        url: '/api/leju/front/order/delOrderPre',
        method: 'get',
        data
    })
}


export default {
    addressList,
    addressSave,
    detail,
    addressUpdate,
	del,
	addOrderBatch,
	orderList,
	payConfirm,
	allDone,
	backOrder,
	orderBackList,
	delOrderPre
}